public class Text3 {
    public static void main(String[] args) {
        Mythread t = new Mythread(){
            @Override
            public void run() {
                while(true){
                    System.out.println("hello thread!");
                }
            }
        };
        t.start();

        while (true){
            System.out.println(" hello main!");
        }
    }
}

